<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>苹果后台</title>
<script type="text/javascript" src="${path}/js/back/jquery.min.js"></script>
<script type="text/javascript"
	src="${path}/js/back/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${path}/js/back/easyui-lang-zh_CN.js"></script>
<script type="text/javascript"
	src="${path}/js/back/datagrid-detailview.js"></script>
<link rel="stylesheet" href="${path}/css/back/themes/default/easyui.css"
	type="text/css" />
<link rel="stylesheet" href="${path}/css/back/themes/icon.css"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="${path}/css/back/demo.css">
	 <style type="text/css"> 
        #fm 
        { 
            margin: 0; 
            padding: 10px 30px; 
        } 
        .ftitle 
        { 
            font-size: 14px; 
            font-weight: bold; 
            padding: 5px 0; 
            margin-bottom: 10px; 
            border-bottom: 1px solid #ccc; 
        } 
        .fitem 
        { 
            margin-bottom: 5px; 
        } 
        .fitem label 
        { 
            display: inline-block; 
            width: 80px; 
        } 
    </style> 
</head>
<body>
<script type="text/javascript">
		var data = ${data};
 $(function(){
	    	$('#dg').datagrid({
	    		/* url:"${path}/manager/toUserEditInit", */
	    		fitColumns:true,//列自适应宽度，不能和冻结列同时设置为true
	    	        striped:true,//斑马线效果
	    	        idField:'oID',//主键列
	    	        rownumbers:true,//显示行号
	    	        singleSelect:true,//是否单选
	    	        pagination:true,//显示分页栏
	    	        pageList:[10,20,50,100],//每页行数选择列表
	    	        pageSize:10,//出事每页行数
	    	        remoteSort:true,//是否服务器端排序，设成false，才能客户端排序
	    	        sortName:'oID',//设置排序列
	    	        sortOrder:'desc',//排序方式
	    	    columns:[[
	    	        {field:'oID',title:'订单编号',width:100},
	    	        {field:'uID',title:'用户编号',width:100},
	    	        {field:'orderTime',title:'订单时间',width:100},
	    	        {field:'type',title:'订单状态',width:100},
	    	        {field:'uAddress',title:'收货地址',width:150},
	    	        {field:'uPhoneNum',title:'电话',width:150},
	    	        {field:'shr',title:'收货人',width:150}
	    	    ]],
	    	     toolbar:[{
	    	    	    	text:'确认',
	    	    	    	iconCls: 'icon-remove',
	        	    	    handler: function(){
	        	    	    	destroyUser();
	        	    	    }
	    	    	    }]
	    	});
	    });
function destroyUser() {
    var row = $('#dg').datagrid('getSelected');
    if (row) {
        $.messager.confirm('Confirm', '是否同意退款?', function (r) {
            if (r) {
                $.post("BackOrder/updateCanOrder?oID=" + row.oID, function (json) {
                		 $.messager.alert("提示信息", "审核成功");
                		 $("#dlg").dialog("close");
                		 $("#dg").datagrid("load");
                });
            }
        });
    }else{
   	 $.messager.alert("提示信息", "请选择数据");
    }
}  
	</script>
<!-- data-options="data:data" -->
	<table id="dg" class="easyui-datagrid" title="商品管理"
		style="width: 700px; height: 365px" toolbar="#toolbar"
		data-options="data:data"
		pagination="true" fitColumns="true" singleSelect="true">
	</table>

</body>
</html>